package com.tdkj.model.shop;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.tdkj.model.base.BaseEntity;
import com.tdkj.model.user.BeanUser;

/**
 * MallNotices entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "shop_notice")
public class BeanShopNotice extends BaseEntity {

	// Fields

	/**
	 * 
	 */
	private String title;
	private String content;
	private Date publishTime;
	private BeanUser user;
	private BeanShop shop;


	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getPublishTime() {
		return this.publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}

	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the user
	 */
	@ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH})
	@JoinColumn(name="user_id")
	public BeanUser getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(BeanUser user) {
		this.user = user;
	}

	/**
	 * @return the shop
	 */
	@ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.REFRESH})
	@JoinColumn(name="shop_id")
	public BeanShop getShop() {
		return shop;
	}

	/**
	 * @param shop the shop to set
	 */
	public void setShop(BeanShop shop) {
		this.shop = shop;
	}
	
	

}